<?php

namespace cainiao\api\v1;

use cainiao\Request;

class Link extends Request
{
    /**
     * 交易订单下发接口（全业务线） GLOBAL_SALE_ORDER_NOTIFY
     * @param array $data
     * @return mixed
     * @throws \think\Exception
     */
    public function GLOBAL_SALE_ORDER_NOTIFY(array $data=[]){
        $this->type='POST';
        $this->msgType=  __FUNCTION__;

        $this->content= array_merge($this->content,$data);
        return $this->exec();
    }

    /**
     * 订单取消接口
     * @param array $data
     * @return mixed
     * @throws \think\Exception
     */
    public function GLOBAL_SALE_ORDER_CANCEL(array $data=[]){
        $this->type='POST';
        $this->msgType=  __FUNCTION__;

        $this->content= array_merge($this->content,$data);
        return $this->exec();
    }

    /**
     * 物流取消接口
     * @param array $data
     * @return mixed
     * @throws \think\Exception
     */
    public function CROSSBORDER_SALES_CANCEL(array $data=[]){
        $this->type='POST';
        $this->msgType=  __FUNCTION__;

        $this->content= array_merge($this->content,$data);
        return $this->exec();
    }

    /**
     * 物流详情查询接口
     * @param array $data
     * @return mixed
     * @throws \think\Exception
     */
    public function CROSSBORDER_LOGISTICS_DETAIL_QUERY(array $data=[]){
        $this->type='POST';
        $this->msgType=  __FUNCTION__;

        $this->content= array_merge($this->content,$data);
        return $this->exec();
    }

    /**
     * 修改订单 身份证信息 & 支付单号
     * @param array $data
     * @return void
     */
    public function CROSSBORDER_ORDER_INFO_MODIFY(array $data=[]){
        $this->type='POST';
        $this->msgType=  __FUNCTION__;

        $this->content= array_merge($this->content,$data);
        return $this->exec();
    }

    /**
     * 订单出库后不能再取消，如果需要拦截订单不让发到买家可以使用此拦截接口。
     * @param array $data
     * @return void
     */
    public function GLOBAL_SALE_ORDER_INTERCEPT_NOTIFY(array $data=[]){
        $this->type='POST';
        $this->msgType=  __FUNCTION__;

        $this->content= array_merge($this->content,$data);
        return $this->exec();
    }

    /**
     * 买家收到货物需要退件，可使用此接口。
     * @param array $data
     * @return mixed
     * @throws \think\Exception
     */
    public function GLOBAL_SALE_ORDER_REFUND_NOTIFY(array $data=[]){
        $this->type='POST';
        $this->msgType=  __FUNCTION__;

        $this->content= array_merge($this->content,$data);
        return $this->exec();
    }

}